home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 4,101 to 4,200 / aol-file-protocol-4400-4101-to-4200.zip / AOLDLs / ADV - Message Board Archives / Archived Msgs_ TextBox2 w_ TE / ADV.TE.textbox2 next >
Internet Message Format  |  2014-11-30  |  5KB

  1. Path: IIGS Toolbox/TextEdit and LETextBox2
  2.  
  3. Subj:  TextEdit and rTextForLETextBox2       91-03-01 21:01:05 EST
  4. From:  PatrickC19
  5. Posted on: America Online
  6.  
  7. I'm having quite a struggle trying to get "rTextForLETextBox2" text into my TextEdit control!  PStrings and CStrings show up just fine and I use the same "rTextForLETextBox2" string in a *dialog* and it shows up! It just won't show up in my TextEdit control!  I'm stumped!
  8.  
  9. I'm creating a window via "NewWindow2() that has one TE Control in it. I pull the TE handle with "GetCtlHandleFromID()", and then I call "TEInsert()" to load the text in the window.  The text, in LETextBox2 format, is a resource too!
  10.  
  11. After playing with it, I noticed that I could get some text to appear *if* I passed a TEXT LENGTH along with the TEInsert() call.  Even though Vol 3 say's that the length param will be ignored!
  12.  
  13. I looked at my TYPES.REZ file and it has "rTextForLETextBox2" defined as  { string; };      Is that right?   Isn't the length word be missing?
  14.  
  15. Here's my TE Control as squished REZ:
  16.         resource rControlTemplate (TopicTextEditRID) {
  17.            TopicTextEditRID,
  18.            {0x0000,0x0000,0x008E,0x015A},
  19.            editTextControl { {
  20.               0,
  21.               fCtlCanBeTarget+fCtlWantsEvents+fCtlProcNotPtr +
  22.                  FctlTellAboutSize + fCtlIsMultiPart,
  23.               0,
  24.               fSingleFormat + fGrowRuler,
  25.               {0xFFFF,0xFFFF,0xFFFF,0xFFFF},   /* indent rect */
  26.               0xFFFFFFFF,
  27.               0,                 /* te vert movement */
  28.               0,0,0,0,0,
  29.               0                  /* text length */
  30.            } };
  31.         };
  32.  
  33. And here's the TEInsert() call:
  34.       TEInsert( (Word) (teTextIsResource + teDataIsTextBox2),
  35.                 (Long) (HelpListItemBaseRID + wItemNum),
  36.                 (Long) 40,             /* should be ignored!!! */
  37.                 (Word) 0,(Long) 0,(Long) TECtlHndl );
  38.  
  39. As I said - I'm stumped and will take any help I can get!
  40. Thanks - Patrick
  41.  
  42.  
  43. Path: IIGS Toolbox/TextEdit and LETextBox2
  44.  
  45. Subj:  TE n stuff                            91-03-01 21:04:27 EST
  46. From:  Damien9
  47. Posted on: America Online
  48.  
  49. Patrick,
  50.  
  51.   I seem to recall seeing a technote or a posting about some incompatilities between text for LETextBoxes and Text Edit.  If I come across it again, I'll post it, but if anyone else has it, maybe they'll post
  52.  
  53. Jeff
  54.  
  55. Path: IIGS Toolbox/TextEdit and LETextBox2
  56.  
  57. Subj:  A Workaround...                       91-03-02 14:45:34 EST
  58. From:  PatrickC19
  59. Posted on: America Online
  60.  
  61. It works as advertised -- IF -- I pass in the length of the LETextBox2 stuff.  Weird...   
  62.  
  63. Scanned TechNote #92, and didn't see anything applicable to my problem.  I'm still wondering if my TYPES.REZ file is a tad off.
  64.  
  65. Patrick
  66.  
  67.  
  68. Path: IIGS Toolbox/TextEdit and LETextBox2
  69.  
  70. Subj:  LETextBox2                            91-03-03 01:17:29 EST
  71. From:  ShanoJ
  72. Posted on: America Online
  73.  
  74. Ya, there are incompatibilities between LETextBox2 text and TE. You have to pass a length to TESetText, but it still isn't guaranteed... :( The best way to do it is to pass the text as a text block, and then the style information in a style block (which is, I assume, why you were trying to use an LETextBox2 parameter).
  75.  
  76. Hope this helps.
  77.  
  78. Jonah
  79.  
  80. Path: IIGS Toolbox/TextEdit and LETextBox2
  81.  
  82. Subj:  LETextBox2                            91-03-08 22:10:52 EST
  83. From:  Matt DTS
  84. Posted on: America Online
  85.  
  86. You can't TEGetText more than 4K worth of text in LETextBox2 format - that's what's in the Technical Notes.
  87.  
  88. You should be able to TESetText with LETextBox2 without too many problems, but it's better to use something like WordWorks or My Word! or another program that creates Teach files to just get the stuff in a format you can pass directly to TextEdit as a TEFormat resource (or rStyleBlock - $8012 - same thing).
  89.  
  90. And, of course, you always have to pass the length of text if your text reference is a *pointer*, but you shouldn't have to if it's a resource.
  91.  
  92. --Matt
  93.  
  94. Path: IIGS Toolbox/TextEdit and LETextBox2
  95.  
  96. Subj:  Matt...                               91-03-10 13:57:36 EST
  97. From:  ShanoJ
  98. Posted on: America Online
  99.  
  100. I found with a program that I was working on that whenever you call TESetText with the text reference in LETextBox2 format, you HAVE to pass the length of the text... Try it with NiftyList and you'll see... :(
  101.  
  102. Jonah
  103.  
  104. Path: IIGS Toolbox/TextEdit and LETextBox2
  105.  
  106. Subj:  Matt, me too                          91-03-11 19:40:15 EST
  107. From:  PatrickC19
  108. Posted on: America Online
  109.  
  110. Matt,
  111. It's *probable* that I'm using TEInsert() *and* TESetText incorrectly -- but I too had to pass in the length of the LETB2 string -- even if it's a resource.
  112.  
  113. When I was using TESetText(), I wasn't using (nor had I set up) any special style or format options.  I just used whatever defaults came along with my "NewControl2()" call.
  114. Patrick
  115.  
  116.  
  117. Problems with putting "rTextForLETextBox2" information into a TextEdit control
  118.  
  119.